<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width,initial-scale=1.0">
		<title>飞行简报</title>
		<link href="css/ele2.3.3.css" rel="stylesheet" type="text/css">
		<link href="css/flyDetail.css" rel="stylesheet" type="text/css">
	</head>

	<body>
		<div id="app" v-cloak>
			<header>
				<div class="logo">空域综合管理</div>
			</header>
			<div class="Wraper">
				<div class="mainBody">
					<h2>飞行简报</h2>
					<!--工具条-->
					<!-- <el-col :span="24" class="toolbar toolbar-cns">
						<el-form class="clearfix" :inline="true" :model="queryParams">
							<el-form-item label="飞行单位:">
								<el-input  v-model="queryParams.fssId" placeholder="请输入"></el-input>
							</el-form-item>
							<el-form-item label="飞行日期:">
								<el-date-picker
										v-model="queryParams.executorDate"
										type="date"
										value-format="yyyy-MM-dd">
								</el-date-picker>
							</el-form-item>
							<el-form-item label="飞行计划编码:">
								<el-input  v-model="queryParams.flyPlanCode" placeholder="请输入"></el-input>
							</el-form-item>
							<el-form-item label="作业性质:">
								<el-input  v-model="queryParams.flyType" placeholder="请输入"></el-input>
							</el-form-item>
							<el-form-item class="clearfix">
								<div class="header clearfix">
									<el-button style="margin-right:30px;" class="add-bottom" @click="fetchData">查询</el-button>
								</div>
							</el-form-item>
						</el-form>
					</el-col> -->
					<!--列表-->
					<main>
						<div class="table-box">
							<el-table :data="tableData" v-loading="loading" element-loading-text="数据加载中..." 
							border style="width: 100%">
								<el-table-column prop="aircraft_number" label="航空器编号" min-width="160" align="center"></el-table-column>
								<el-table-column prop="pilot_id" label="飞行员ID" min-width="120"  align="center"></el-table-column>								
								<el-table-column prop="pilot_name" label="飞行员姓名" align="center"></el-table-column>								
								<el-table-column prop="fly_time" label="起飞时间  "  align="center"></el-table-column>								
								<el-table-column prop="land_time" label="降落时间" min-width="160" align="center"></el-table-column>								
								<el-table-column prop="land_number" label="降落架次" min-width="160" align="center"></el-table-column>								
								<el-table-column prop="is_Give_Alarm" label="有无违规告警" min-width="160" align="center"></el-table-column>								
								<el-table-column prop="is_Danger_Alam" label="有无危险告警" min-width="160" align="center"></el-table-column>								
								<el-table-column prop="updateTimeStr" label="飞行计划编号" min-width="160" align="center"></el-table-column>								
								<el-table-column prop="estimate_start_time" label="预计开始时间" min-width="160" align="center"></el-table-column>								
								<el-table-column prop="estimate_end_time" label="预计结束时间" min-width="160" align="center"></el-table-column>								
								<el-table-column prop="estimate_land_time" label="预计起落架次" min-width="160" align="center"></el-table-column>								
								<el-table-column prop="comapny" label="企业名称" min-width="160" align="center"></el-table-column>								
								<el-table-column prop="aircraft_type" label="航空器类型" min-width="160" align="center"></el-table-column>								
								<el-table-column prop="aircraft_model" label="航空器机型" min-width="160" align="center"></el-table-column>								
								<!-- <el-table-column prop="points_decimal" label="航迹点坐标" min-width="160" align="center"></el-table-column>								 -->
								
						   </el-table>

							<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
							:current-page="queryParams.page" :page-sizes="[10, 20, 50]" :page-size="queryParams.size"
							layout="total, sizes, prev, pager, next, jumper" :total="total">
							</el-pagination>
						</div>
					</main>
					<!-- 同步用户对话框 -->
					<el-dialog :title="title[dialogType]" :visible.sync="synchroUserVisible" class="synchroUser" center>
						<el-form :model="synchroForm" class="clearfix">
							<el-form-item label="服务站" prop="userLoginName">
								<el-select v-model="synchroForm.id" clearable placeholder="请选择服务站">
									<el-option
										v-for="item in options"
										:key="item.value"
										:label="item.label"
										:value="item.value">
									</el-option>
								</el-select>
							</el-form-item>
							<el-form-item label="同步日期" prop="userLoginName">
								<el-date-picker
									v-model="queryParams.executorDate"
									type="date"
									value-format="yyyy-MM-dd">
								</el-date-picker>
							</el-form-item>
						</el-form>
						<div slot="footer" class="dialog-footer">
							<el-button @click="synchroUserVisible = false">取 消</el-button>
							<el-button type="primary" @click="synchroUserFinishAdd">确 定</el-button>
						</div>
					</el-dialog>

				</div>
			</div>
		</div>

		<script src="plugins/vue2.5.9.js"></script>
		<script src="plugins/axios.min.js"></script>
		<!--<script src="plugins/ele2.3.3.js"></script>-->
		<script src="plugins/element-ui.js"></script>
		<script src="plugins/httpVueLoader.js"></script>
		<script src="plugins/jquery.min.js"></script>
		<script src="plugins/leaflet.js"></script>
		<script src="plugins/iclient9-leaflet.min.js"></script>
		<script src="plugins/leaflet.draw.js"></script>
		<script src="plugins/leaflet.measurecontrol.min.js"></script>
		<script src="plugins/leaflet.rotatedMarker.js"></script>

		<script type="text/javascript">
			var vm = new Vue({
				el: '#app',
				data: {
					queryParams: {
						page: 1,
						size: 10,
					},
					loading: false,
					tableData: [],
					total: 0,
					dialogFormVisible: false,
					dialogType: '',
					//baolin
					options: [],
					synchroUserVisible: false,
					synchroForm: {
						regionId: ''
					},
					title: {
						create: '新增VHF电台',
						edit: '修改VHF电台',
						look: '查看VHF电台',
						synchroUser: '同步飞行计划'
					},
					commonUrl: 'http://212.64.57.59:10006/', //212
					// commonUrl: 'http://dkjs.op-fly.cn/system/', //自己的
				},
				created: function() {
					this.fetchData()
				},
				mounted: function() {

				},
				methods: {
					// 获取用户数据
					fetchData () {
						 this.loading = true
						 var self = this;
						 var parms = self.queryParams;
						 console.log(parms)
						 axios.post(self.commonUrl + 'flyBriefing/selectAll', parms).then(function(response) {
							if(response.status == 200) {
								console.log(response)
								 self.tableData = response.data.flyBriefing
								// self.total = response.data.page.totalCount
								 self.loading = false
							}
						}).catch(function(error) {
							console.log(error);
						});
					},
					//同步飞行计划
					synchroFlightFly () {
						//this.synchroUserVisible = true
						//this.dialogType = 'synchroUser'
					},
					//完成同步同步飞行计划接口
					synchroUserFinishAdd () {

					},
					handleSizeChange (value) {
						this.queryParams.size = value
						this.fetchData()
					},
					handleCurrentChange (value) {
						this.queryParams.page = value
						this.fetchData()
					}
				}
			});
		</script>

	</body>

</html>